<!DOCTYPE html>
<html ng-app="studentApp">
    <head>
        <meta charset="utf-8">
        <title>学生管理</title>
        <link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css">
    </head>
    <body ng-controller="StudentController">
        <div class="panel panel-default">
            <div class="panel-heading">
                <div class="panel-title">
                    <button class="btn btn-primary" data-toggle="modal" data-target="#studentModal">新增学生信息</button>
                </div>
            </div>
            <div class="panel-body">
                <table class="table table-stripe">
                    <tr>
                        <th>学号</th>
                        <th>姓名</th>
                        <th>部门</th>
                        <th>身份证号码</th>
                        <th>专业</th>
                        <th>性别</th>
                    </tr>
                    <tr ng-repeat="student in students">
                        <td>{{ student.code }}</td>
                        <td>{{ student.name }}</td>
                        <td>{{ student.bmbh }}</td>
                        <td>{{ student.idcardno }}</td>
                        <td>{{ student.major }}</td>
                        <td>{{ student.sex }}</td>
                    </tr>
                </table>
            </div>
        </div>
        
        <div class="modal fade" id="studentModal" tabindex="-1" role="dialog" aria-labelledby="studentModalLabel">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                        <h4 class="modal-title" id="studentModalLabel">新增学生信息</h4>
                    </div>
                    <div class="modal-body">
                        <div class="form-group">
                            <input type="text" class="form-control" placeholder="请输入学号" ng-model="newStudent.code">
                        </div>
                        <div class="form-group">
                            <input type="text" class="form-control" placeholder="请输入姓名" ng-model="newStudent.name">
                        </div>
                        <div class="form-group">
                            <input type="text" class="form-control" placeholder="请输入部门编号" ng-model="newStudent.bmbh">
                        </div>
                        <div class="form-group">
                            <input type="text" class="form-control" placeholder="请输入身份证号码" ng-model="newStudent.idcard">
                        </div>
                        <div class="form-group">
                            <input type="text" class="form-control" placeholder="请输入专业" ng-model="newStudent.major">
                        </div>
                        <div class="form-group">
                            <input type="radio" ng-model="newStudent.sex"> 男
                            <input type="radio" ng-model="newStudent.sex"> 女
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-danger" data-dismiss="modal">关闭</button>
                        <button type="button" class="btn btn-primary">保存</button>
                    </div>
                </div>
            </div>
        </div>
        
        <script src="//cdn.bootcss.com/jquery/1.9.1/jquery.js"></script>
        <script src="//cdn.bootcss.com/bootstrap/3.3.6/js/bootstrap.js"></script>
        <script src="//cdn.bootcss.com/angular.js/1.5.5/angular.js"></script>
        <script src="//cdn.bootcss.com/angular.js/1.5.5/angular-route.js"></script>
        <script src="//cdn.bootcss.com/angular.js/1.5.5/angular-resource.js"></script>
        <script src="js/app.js"></script>
    </body>
</html>
